Modern software projects typically comprise multiple programs interacting with each other. Typically, the programs are written in different programming languages, e.g., Natural, C++ or Assembler. For instance, the core functionality of a complex program which is used for monitoring technical processes such as the operation of a brake of a car may be created using a programming language specifically designed for this purpose. Related tasks, for example the presentation of a display about the braking action are then performed by programs which are called as required and which could be realized in another programming language.
Another example of such a scenario is a complex monitoring program which communicates with a database in order to obtain certain data. However, the program does not instruct the database how this data has to be obtained. The actual steps of obtaining data from the database could then be achieved by using another program written in another programming language. As another example, an Assembler program can provide the functionality for working with client certificates when calling web services from the underlying core program.
In other words, while the core functionality defines what has to be done in order to solve a certain task, it does not specify the exact steps necessary for solving the problem. It describes the problem from a highly abstract level.
Such high-level programming languages may be referred to as fourth generation languages, or short as 4GL. A Fourth Generation Language provides a compiler, interpreter and runtime environment to execute 4GL programs. 4GLs, in general, provide better abstraction from the underlying hardware, operating system and other computer specifics, thus providing better independence from the computer system used. Examples for fourth generation languages are Natural which is available from applicant, SQL or ABAP.
Programs that are typically used for executing specific tasks necessary for solving a problem are usually referred to as third generation languages, or short as 3GL. A Third Generation Language provides a compiler to create executable files directly from source code, avoiding the cumbersome Assembler programming. The 3GL program usually needs to manage its own memory space and interaction with the operating system or hardware to a certain degree directly. Examples for such third generation languages are Fortran, C++, COBOL, PLI or Java.
As mentioned, such programs are called by the core program, i.e., the 4GL software, as needed. However, programs created in different programming languages may also require different runtime environments as will be explained with reference to FIG. 1. Runtime environments 140, 150 provide a program with functions necessary for running on a certain operating system 160. In other words, programs may need a specific runtime environment.
Thus, when a core program such as a 4GL program 100 invokes 110 another program such as a 3GL or Assembler program 120 with a command (e.g., a CALL statement), a change of the runtime environment is necessary. This change typically requires a context switch 130 from the 4GL runtime environment 140 to, e.g., the 3GL runtime environment 150. Such context switch 130 requires saving the current state of the running program 100 (e.g., the core program created in 4GL) in the current runtime environment 140, locating and loading the called program (e.g., a 3GL or an Assembler program) 120, initializing the appropriate called runtime environment 150, providing suitable parameters to the called runtime environment 150 and activating the called runtime environment 150.
It is apparent that such a process is very complex, time consuming, increases the overhead and therefore reduces the performance. This is to even more the case since a similar process 170 has to be performed when returning to the original program 100.
It is therefore the technical problem underlying the present invention to improve the present methods for calling and executing programs from an originating program, wherein the called program requires another runtime environment, thereby overcoming the problems of the prior art at least in part.